<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="erp" uri="/erp-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">
<link rel="stylesheet"
	href="<%=basePath%>script/jquery-ui-1.10.4/themes/base/jquery.ui.all.css">
<script src="<%=basePath%>script/jquery-ui-1.10.4/jquery-1.10.2.js"></script>
<script src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.core.js"></script>
<script
	src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.widget.js"></script>
<script
	src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.button.js"></script>
<script
	src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.position.js"></script>
<script
	src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.tooltip.js"></script>
<script src="<%=basePath%>script/script.js"></script>
<link rel="stylesheet"
	href="<%=basePath%>script/jquery-ui-1.10.4/demos/demos.css">
<link rel="stylesheet" href="<%=basePath%>style/style.css">
<script>
	$(function() {
		init_list_page();
	});

	function gotoPage(pageIndex) {
		window.location.href = "user_list.action?page.pageIndex=" + pageIndex;
	}
</script>

</head>
<body>
	<div class="ui-widget list_container center">
		<h1>所有用户列表</h1>
		<table class="ui-widget ui-widget-content">
			<thead>
				<tr class="ui-widget-header ">
					<th>编号</th>
					<th>用户名</th>
					<th>职务</th>
					<th>部门</th>
					<th>上次登录时间</th>
					<th colspan="3">操作</th>
				</tr>
			</thead>
			<tbody>
				<s:iterator value="#request.userList">
					<tr>
						<td>${id}</td>
						<td>${name}</td>
						<td><s:iterator value="#request.roles">
								<a href="role_getDescription.action?id=${id}" class="a_watch"
									title="">${name}</a>
								<br />
							</s:iterator></td>
						<td><a
							href="department_getDescription.action?id=${department.id}"
							class="a_watch">${department.name}</a></td>
						<td><s:date name="%{loginTime}" format="yyyy年MM月dd日 HH点mm分" /></td>
						<td><erp:link url="user_editPage" value="修改" params="id"
								attr="class:a_edit_user" /></td>
						<td><erp:link url="user_delete" value="删除" params="id"
								attr="class:a_delete" /></td>
						<td><erp:link url="user_initPassword" value="初始化密码"
								params="id" attr="class:a_initPassword" /></td>
					</tr>
				</s:iterator>
			</tbody>
		</table>

		<!-- 分页信息 -->
		<br />
		<%@include file="/WEB-INF/jsp/public/pageController.jsp"%>
		<br /> <br />

		<erp:link url="user_addPage" value="添加" attr="class:a_add_user" />
	</div>
</body>
</html>
